<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新增页面</title>
    <style type="text/css">
        td{
            height: 25px;
            width: 100px;
            border: #3a8ee6 1px solid;

        }
        input{
            height: 21px;
        }
    </style>

    <script type="text/javascript" src="../../js/jquery-3.3.1.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script type="text/javascript" src="../../js/01/daoru/drugc/01.js"></script>
    <script type="text/javascript" src="../../js/01/daoru/daoru.js"></script>
    <script type="text/javascript">
        $(function(){

            //查询所有药品类别
            $.ajax({
                url:"/myspringboot/DrugCategoryController/fandAllDrugCategory",
                data:"",
                type:"post",
                dataType:"json",
                success:function(result){
                    console.log(result);
                    var result = result.data;
                    var opts = "";
                    for (var i = 0; i < result.length; i++) {
                        var dcId = result[i].dcId;
                        var dcName = result[i].dcName;
                        var opt = '<option value="'+dcId+'">'+dcName+'</option>';
                        opts += opt;
                    }
                    $("#b").append(opts);
                }
            })

        })


    </script>

</head>
<body>
<form action="">

<table class="" style="border: 1px solid #999;border-collapse:collapse">
    <!-- 用来存放修改的主键 -->
    <!--<input type="hidden" id="diId">-->
    <tr>
        编辑药品品目
    </tr>
    <tr>
        <td>药品品目号：</td>
        <td><input type="text" value="" id="daNumber"></td>
        <td></td>
        <td>通用名：</td>
        <td><input type="text" value="" id="diName"></td>
        <td></td>
    </tr>
    <tr>
        <td>剂型：</td>
        <td><input type="text" value="" id="diForm"></td>
        <td></td>
        <td>规格：</td>
        <td><input type="text" value="" id="diSpecifications"></td>
        <td></td>
    </tr>
    <tr>
        <td>单位：</td>
        <td><input type="text" value="" id="diUnit"></td>
        <td></td>
        <td>转换系数：</td>
        <td><input type="text" value="" id="diCc"></td>
        <td></td>
    </tr>
    <tr>
        <td>药品类别：</td>
        <td>
            <select style=" height: 25px; width: 160px;" id="b" class="diDaCategory">
                <option value="">请选择</option>
            </select>
        </td>
        <td></td>
        <td>状态：</td>
        <td>
            <select style=" height: 25px; width: 160px;" id="diState">
                <option value="">请选择</option>
                <option value="0">正常</option>
                <option value="1">异常</option>
            </select>
        </td>
        <td></td>
    </tr>
</table>
<td>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <button onclick="add()">提交</button>
    <button onclick="history.go(-1)" href="javascript:if(confirm('确实要放弃操作吗?返回之后，所添加数据不会保存！'))location='add.html'">
        关闭
    </button>
</td>

</form>
</body>
</html>